package com.gmail.rusal4ica.dots;

import android.os.Bundle;
import android.app.Activity;
import android.content.Intent;
import android.view.View;
import android.widget.ImageView;

/**
 * @author The Imperial Sword Team
 */

public class MainActivity extends Activity {
	private ImageView menuStart;
	private ImageView menuAbout;
	
	static Intent intentOptions;
	static Intent intentPlay;
	static Intent intentAbout;
	
	
	@Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
        
        menuStart = (ImageView)findViewById(R.id.menu_start);
        menuAbout = (ImageView)findViewById(R.id.menu_about);
        
        menuStart.setOnClickListener(onClickMenu);
        menuAbout.setOnClickListener(onClickMenu);
        
        intentOptions = new Intent("android.intent.action.OPTIONSACTIVITY");
        intentPlay = new Intent("android.intent.action.PLAYACTIVITY");
        intentAbout = new Intent("android.intent.action.ABOUTACTIVITY");
    }

    View.OnClickListener onClickMenu = new View.OnClickListener() {
    	@Override
    	public void onClick(View v) {
    		switch(v.getId()){
    		case(R.id.menu_start):
    			startActivity(intentOptions);
    		break;
    		case(R.id.menu_about):
    			startActivity(intentAbout);
    		break;
    		}
  	  }
    };
}
